/**
 * 人物到达终点
 */
cc.Class({
    extends: cc.Component,

    properties: {

    },


    onLoad() { },

    onBeginContact: function (contact, selfCollider, otherCollider) {
        //将人物的线速度改为0，播放自身动画和人物动画
        let velocity = otherCollider.node.getComponent(cc.RigidBody)._b2Body.m_linearVelocity;
        velocity.x = 0;
        velocity.y = 0;
        otherCollider.node.prop="Finished";
        selfCollider.node.getComponent(cc.Animation).play("finish");
        otherCollider.node.getComponent(cc.Animation).play("takeGuitar");

    },

    start () {
    },

    // update (dt) {},
});
